{% extends 'blank.html.twig' %}
{% block body %}
    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;系统管理</span> <span class="c-gray en">&gt;</span> 客户端版本管理 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
    <div class="page-container">
        <div class="text-c">
            <form action="{{ path('version_list') }}" method="post">
                </span> 日期范围：
                <input type="text" name="start_time" class="input-text" id="countTimestart" onfocus="selecttime(1)" value="" style="width:120px;" >
                <input type="text" name="end_time" class="input-text" id="countTimestart" onfocus="selecttime(2)" value=""  style="width:120px;">
                <input type="text" name="upgrade_point" id="" value="" placeholder=" 升级说明" style="width:250px" class="input-text">
                <button name="" id="" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜升级说明</button>
            </form>
        </div>
        <div class="cl pd-5 bg-1 bk-gray mt-20">
            <span class="l">
                {#<a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>#}
                <a href="javascript:;" onclick="member_add('版本新增','{{ path('version_add') }}','','510')"  class="btn btn-primary radius">
                    <i class="Hui-iconfont">&#xe600;</i> 版本新增</a>
            </span>
            <span class="r">共有数据：<strong>{{ totaldatanum }}</strong>条</span>
        </div>
        <div class="mt-20">
            <table class="table table-border table-bordered table-bg table-hover table-sort table-responsive" >
                <thead>
                <tr>
                    <th>序号</th>
                    <th>app类型</th>
                    <th>内部版本号</th>
                    <th>外部版本号</th>
                    <th>是否强制更新</th>
                    <th>安装包地址</th>
                    <th>安装包下载二维码</th>
                    <th>升级说明</th>
                    <th>状态</th>
                    <th>创建时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {% for item in pagination %}
                    <tr class="">
                        <th>{{ item.id }}</th>
                        {% if item.apptype == 1 %}
                           <th><span class="label label-success radius">Android</span></th>
                        {% elseif item.apptype == 2 %}
                           <th><span class="label label-danger radius">IOS</span></th>
                        {% endif %}
                        <th>{{ item.version }}</th>
                        <th>{{ item.versioncode}}</th>
                        {% if item.isforce == 1 %}
                           <th><span class="label label-danger radius">是</span></th>
                        {% elseif item.isforce == 2 %}
                           <th><span class="label label-success radius">否</span></th>
                        {% endif %}
                        <th>{{ item.apkurl }}</th>
                        <th><img src="{#{{ qrcode_url(item.apkurl,{size:50}) }}#}" /></th>
                        <th>{{ item.upgradepoint }}</th>
                        {% if item.status == 1 %}
                           <th><span class="label label-success radius">正常</span></th>
                        {% elseif item.status == 2 %}
                           <th><span class="label label-danger radius">失效</span></th>
                        {% endif %}
                        <th>{{ item.createtime }}</th>
                        <th><a title="删除" href="javascript:;" onclick="member_del(this,'1')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a></th>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
            <div class="navigation">
                {{ knp_pagination_render(pagination) }}
            </div>
        </div>
    </div>
{% endblock %}

{% block footer %}
    {{parent()}}
    <script type="text/javascript">
        /*用户-添加*/
        function member_add(title,url,w,h){
            layer_show(title,url,w,h);
        }
    </script>
{% endblock %}